/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class TemperatureAndHumiditySensor {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010020019';
    }

    get categoryName() {
        return '\u6e29\u6e7f\u5ea6\u4f20\u611f\u5668';
    }

    getAlarmStatus(params) {
        return command({
            method: 'getAlarmStatus',
            methodId: 'phEq1Dmd',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getAlarmType(params) {
        return command({
            method: 'getAlarmType',
            methodId: 'ptRSbs9Z',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getHumidity(params) {
        return command({
            method: 'getHumidity',
            methodId: 'pghzWkrr',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTemperature(params) {
        return command({
            method: 'getTemperature',
            methodId: 'pDrhEqTA',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setHighHumidityAlarmThreshold(params) {
        return command({
            method: 'setHighHumidityAlarmThreshold',
            methodId: 'pZgRtG7w',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setHighTemperatureAlarmThreshold(params) {
        return command({
            method: 'setHighTemperatureAlarmThreshold',
            methodId: 'peHyqOz5',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setLowHumidityAlarmThreshold(params) {
        return command({
            method: 'setLowHumidityAlarmThreshold',
            methodId: 'pGox7xeU',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setLowTemperatureAlarmThreshold(params) {
        return command({
            method: 'setLowTemperatureAlarmThreshold',
            methodId: 'ppAXijqm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default TemperatureAndHumiditySensor;
